From: Andrew Cooper Date: Sat, 2 Jul 2016 10:43:02 +0000 (+0100) Subject: xen/trace: Turn the stub debugtrace_{dump,printk}() macros into functions X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~486 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=f59174d7e5fb8bb530246003d373345b5b433ea0;p=xen.git xen/trace: Turn the stub debugtrace_{dump,printk}() macros into functions This allows printf format checking to be performed, and for debugtrace_printk() to evaluate its arguments, even if debugtrace is disabled at compile time. No intended change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index d04864e12c..e518adc629 100644 --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -68,8 +68,10 @@ extern void debugtrace_dump(void); extern void debugtrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); #else -#define debugtrace_dump() ((void)0) -#define debugtrace_printk(_f, ...) ((void)0) +static inline void debugtrace_dump(void) {} +static inline void + __attribute__ ((format (printf, 1, 2))) +debugtrace_printk(const char *fmt, ...) {} #endif /* Allows us to use '%p' as general-purpose machine-word format char. */